package com.gper.edu.vip.builder.singleton;

/**
 * @Author: ellis.guan
 * @Description: 注册式单例
 * 1. 优点: 线性安全，性能高，写法优雅
 * 2. 缺点: 浪费内存(类加载时，就存放在Map中)
 * @Date: 2020/2/26 21:50
 * @Version: 1.0
 */
public enum RegisterEnumSingleton {
    INSTANCE;

    private Object value;

    public Object getValue() {
        return value;
    }

    public void setValue(Object value) {
        this.value = value;
    }

    public static RegisterEnumSingleton getInstance(){
        return INSTANCE;
    }
}
